﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using OAonline.Models;
using System.Workflow.Activities;
using CommonLibrary.Common;
using ServiceApplication.Service.Basic;

namespace OAonline.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/
        BasicService bs = new BasicService();
        public ActionResult Main(UserModel user)
        {
            //System.Web.HttpContext.Current.Application
            //Dictionary<int, StateMachineWorkflowInstance> a = (Dictionary<int, StateMachineWorkflowInstance>)System.Web.HttpContext.Current.Application[MyWorkHelpr.WorkflowStaticTemplate];
            return View(user);
        }

        public ActionResult Test()
        {
           ViewData["formdefi"] = ZTreeHelper.Serialize(bs.GetWebUserNodeList());
            return View();
        }

        public String InitTree()
        {
            String treeString = ZTreeHelper.Serialize(bs.GetWebUserNodeList());
            return treeString;
        }

    }
}
